<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="/WEB-INF/template/templateAdmin.xhtml">
	<ui:define name="content">
		<f:view locale="#{language.locale}">
			<f:loadBundle basename="properties.messages" var="msg" />
			<div class="createRepBody">
				<div class="createRepTitle">#{msg.viewRepositories}</div>
				<br/>
				<h:form id="formID">
					<h:panelGrid columns="3">
						<h:outputText value="#{msg.repNameLabel}"></h:outputText>
						<h:inputText id="repName" value="#{repositoryDTO.repName}"
							autocomplete="off">
							<f:ajax event="keyup" render="repList"
								listener="#{repositoryDTOController.repNameListener}" />
							<f:validator binding="#{repNameValidator2}"
								validatorId="repNameValidator2"
								disabled="#{empty param['formID:viewButton']}" />
						</h:inputText>

						<h:message id="errorMessage2" for="repName" showSummary="true"
							showDetail="false"
							errorStyle="color:red; font-family: 'New Century Schoolbook', serif; font-style: oblique;">
						</h:message>
						<h:outputText></h:outputText>
						<h:selectOneMenu id="repList"
							value="#{repositoryDTOController.selectedRep}">
							<f:selectItems
								value="#{repositoryDTOController.matchingRepositories}"></f:selectItems>
							<f:ajax event="change" render="repName repList"
								listener="#{repositoryDTOController.repListListener}"></f:ajax>
						</h:selectOneMenu>
						<h:outputText></h:outputText>

<br/>
						<h:commandButton value="#{msg.viewButton}"
							class="selectRepositoryButton"
							action="#{repositoryDTOController.viewRepository}" id="viewButton" />
					</h:panelGrid>
				</h:form>
			</div>
		</f:view>
	</ui:define>
</ui:composition>
</html>